/*
 * User: rant
 * Date: 07/02/2007
 *
 *
 */
package laMalinche.rete.conditions;

import laMalinche.rete.nodes.ConditionNode;
import laMalinche.rete.nodes.editing.CertaintyManager;
import laMalinche.rete.rule.EditingCondition;

/**
 *
 */
public class BasicEditingCondition implements EditingCondition {
	private ConditionNode conditionNode;
	private CertaintyManager certaintyManager;

	public CertaintyManager getCertaintyManager() {
		return certaintyManager;
	}

	public void setCertaintyManager(final CertaintyManager certaintyManager) {
		this.certaintyManager = certaintyManager;
	}

	public void setCondition(ConditionNode condition) {
		conditionNode = condition;
	}

	public boolean isDisjunction() {
		return false;
	}

	public boolean isComplied() {
		return Boolean.TRUE.equals(getConditionNode().isConditionMet()) && certaintyManager.isCertain();
	}

	public ConditionNode getConditionNode() {
		return conditionNode;
	}

	public void setConditionNode(final ConditionNode conditionNode) {
		this.conditionNode = conditionNode;
	}
}